Use accessor functions to access GtkBox
authorJavier Jardón <jjardon@gnome.org>
Mon, 24 May 2010 23:57:10 +0000 (01:57 +0200)
committerJavier Jardón <jjardon@gnome.org>
Tue, 13 Jul 2010 17:40:45 +0000 (19:40 +0200)
gtk/gtkbbox.c
gtk/gtkfilechooserdefault.c
gtk/gtkstatusbar.c

index 4f68309a07b4d7558be5eb20f5ea04422e97af3b..826e310cf5eaf203bfb6fb851194253d4b15fe26 100644 (file)
@@ -348,7 +348,7 @@ gtk_button_box_get_child_secondary (GtkButtonBox *widget,
   g_return_val_if_fail (GTK_IS_WIDGET (child), FALSE);
 
   child_info = NULL;
-  list = GTK_BOX (widget)->children;
+  list = gtk_container_get_children (GTK_CONTAINER (widget));
   while (list)
     {
       child_info = list->data;
@@ -394,7 +394,7 @@ gtk_button_box_set_child_secondary (GtkButtonBox *widget,
   g_return_if_fail (GTK_IS_WIDGET (child));
   g_return_if_fail (child->parent == GTK_WIDGET (widget));
 
-  list = GTK_BOX (widget)->children;
+  list = gtk_container_get_children (GTK_CONTAINER (widget));
   while (list)
     {
       GtkBoxChild *child_info = list->data;
@@ -468,7 +468,7 @@ _gtk_button_box_child_requisition (GtkWidget *widget,
 
   nchildren = 0;
   nsecondaries = 0;
-  children = GTK_BOX(bbox)->children;
+  children = gtk_container_get_children (GTK_CONTAINER (bbox));
   needed_width = child_min_width;
   needed_height = child_min_height;  
   ipad_w = ipad_x * 2;
@@ -539,7 +539,7 @@ gtk_button_box_size_request (GtkWidget      *widget,
   priv = bbox->priv;
 
   orientation = gtk_orientable_get_orientation (GTK_ORIENTABLE (widget));
-  spacing = box->spacing;
+  spacing = gtk_box_get_spacing (box);
   layout = priv->layout_style != GTK_BUTTONBOX_DEFAULT_STYLE
            ? priv->layout_style : gtk_button_box_kludge_get_layout_default (GTK_BUTTON_BOX (widget));
 
@@ -625,7 +625,7 @@ gtk_button_box_size_allocate (GtkWidget     *widget,
   priv = box->priv;
 
   orientation = gtk_orientable_get_orientation (GTK_ORIENTABLE (widget));
-  spacing = base_box->spacing;
+  spacing = gtk_box_get_spacing (base_box);
   layout = priv->layout_style != GTK_BUTTONBOX_DEFAULT_STYLE
            ? priv->layout_style : gtk_button_box_kludge_get_layout_default (GTK_BUTTON_BOX (widget));
   _gtk_button_box_child_requisition (widget,
@@ -793,7 +793,7 @@ gtk_button_box_size_allocate (GtkWidget     *widget,
         childspace = child_height + childspacing;
       }
 
-  children = GTK_BOX (box)->children;
+  children = gtk_container_get_children (GTK_CONTAINER (box));
 
   while (children)
     {
index e340d7f8a3f831f192e4d446388d12bb8513091a..b3a80cc8ec0551065354377532fca6ec16d9edf5 100644 (file)
@@ -8026,7 +8026,7 @@ gtk_file_chooser_default_get_default_size (GtkFileChooserEmbed *chooser_embed,
          gtk_widget_get_visible (impl->extra_widget))
        {
          gtk_widget_size_request (impl->extra_align, &req);
-         *default_height += GTK_BOX (chooser_embed)->spacing + req.height;
+         *default_height += gtk_box_get_spacing (GTK_BOX (chooser_embed)) + req.height;
        }
     }
   else
index 3d72d430125f595dd972b057fe746b345ebd9b3e..0ee091d87051e800e9ecf7b9266925eea8166e7e 100644 (file)
@@ -245,8 +245,8 @@ gtk_statusbar_init (GtkStatusbar *statusbar)
 
   gtk_widget_set_redraw_on_allocate (GTK_WIDGET (box), TRUE);
 
-  box->spacing = 2;
-  box->homogeneous = FALSE;
+  gtk_box_set_spacing (box, 2);
+  gtk_box_set_homogeneous (box, FALSE);
 
   statusbar->has_resize_grip = TRUE;
 
@@ -985,7 +985,7 @@ has_extra_children (GtkStatusbar *statusbar)
     return TRUE;
 
   frame = NULL;
-  for (l = GTK_BOX (statusbar)->children; l; l = l->next)
+  for (l = gtk_container_get_children (GTK_CONTAINER (statusbar)); l; l = l->next)
     {
       frame = l->data;